;+
; NAME: 
;       GALACTIC_PARAMS
;
; PURPOSE: 
;       Define a system variable, !MW that holds the galactic
;       parameters, and other global quantities needed.  
;
; CALLING SEQUENCE: 
;       GALACTIC_PARAMS
;
; INPUTS:
;       NONE
;
; KEYWORD PARAMETERS: 
;       NONE
;
; OUTPUTS:
;       NONE  (Sets system variable !MW)
;
; NOTES:
;       ALL DISTANCES ARE IN pc, ALL VELOCITIES ARE IN km/s
;
;       Galactic parameters stored in this system variable:
;         RO       -- Galactocentric radius of the solar circle
;         V0       -- Circular Velocity of the solar circle
;         Z0       -- Offset of the Sun ABOVE the Galacitc midplane
;         BIGU     -- Solar Peculiar Motion toward GC
;         BIGV     -- Solar Peculiar Motion toward l=90
;         BIGW     -- Solar Peculiar Motion toward NGP
;         VS       -- Velocity Correction for HMSFR
;         ERRVLSR  -- Standard error in the V_LSR
;         NBINS    -- Number of bins to use for pdf calculation
;         BINSIZE  -- Binsize for pdf calculation
;         BINSTART -- Starting distance for pdf calculation
;         NVBINS   -- Number of bins for common velocity spectrum
;         DELTAV   -- Bin spacing for the common velocity spectrum
;         VSTART   -- Minimum velocity for the common velocity
;                     spectrum
;         TA_CONT  -- 21-cm continuum emission level for exclusion
;                     (hisa.pro)
;         TA_HI    -- Minimum HI line temperature for calculation of
;                     HISA spectrum
;
; MODIFICATION HISTORY:
;
;       Tue Oct 20 09:48:35 2009, Erik Rosolowsky <erosolo@A302357>
;		Written
;
;       06/03/10: TPEB -- Added parameters for the distance
;                         probability vector (distances in pc) &
;                         ERRVLSR
;       07/19/10: TPEB -- Added Vs -- correction for HMSFR
;       08/31/10: TEPB -- Added NVBINS -- # bins for velocity spectra
;       10/17/10: TPEB -- Added 21-cm continuum limits (TA_*)
;       04/22/11: TPEB -- Added ZO -- Vertical offset of the Sun from
;                         the Galactic midplane
;       04/27/11: TPEB -- Added the Solar Pecular Motion values, so
;                         that any change need only be made here.
;       06/28/11, TPEB -- Added (commented out) values for the Solar
;                         peculiar motion from Binney
;                         (2010,MNRAS,401,2318)
;       09/05/11, TPEB -- Updated Reid Rotation Curve parameters to
;                         new values (Reid, 2011, priv. comm.) based
;                         on 60 parallaxes (VLBA + VERA).
;       09/26/11, TPEB -- Update to Solar Peculiar Motion based on
;                         recent paper, plus updated Reid values based
;                         on his MW2011 talk (paper forthcoming).
;
;-

PRO GALACTIC_PARAMS
  
  COMPILE_OPT OBSOLETE
  
  ;;               R0 +- 0.25 V0 +- 9  (Reid, 2011, priv. comm., MW2011)
  defsysv, '!MW', {R0:8.51d3, V0:2.44d2, Z0:25.d0, VS:6.0d, ERRVLSR:7.d, $
                   
                   ;; Solar Motion from Dehnen & Binney (1998,MNRAS,298,387)
                   ;; BIGU:10.0d, BIGV:5.25d, BIGW:7.17d, $
                   ;; Solar Motion from Binney (2010,MNRAS,401,2318)
                   ;; BIGU:10.0d, BIGV:11.0d, BIGW:7.17d, $
                 
                   ;; Solar Motion from Schoenrich, Binney & Dehnen
                   ;; (2010,MNRAS,403,1829)  (Hipparcos + Chemsitry)
                   BIGU:11.1d, BIGV:12.24d, BIGW:7.25d, $

                   ;; Distance Bins (out to 20 kpc)
                   NBINS:1000, BINSIZE:20., BINSTART:20., $
                   
                   ;; Velocity Bins (-100 km/s < VLSR < 200 km/s)
                   ;;NVBINS:1000, DELTAV:0.212, VSTART:-50}  ;; From grsmatch
                   NVBINS:1500, DELTAV:0.200, VSTART:-100,$
                   
                   ;; Antenna Temperature Limits for 21-cm data sets
                   TA_CONT:60., TA_HI:60.}
  
  RETURN
END
